#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project : python的学习
@File    : 赋值语句.py
@IDE     : PyCharm
@Author  : 春风十里
@Date    : 2023/6/27 15:24

'''
a, b = 10, 20
print(a, b)
a, b = [20, 30]
print(a, b)
s = "SPAM"
a, b = s[:3], s[2:]
print(a, b)
s = "SPAM"
(a, b), c = s[:2], s[2:]
print(a, b, c)
l = [1, 2, 3, 4, 5]
while l:
    l = l[1:]
    print(l)
s = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
for (a, b, c) in s:
    print(a, b, c)

a, *b = "abcdefg"
print(a, b)
a, *b, c = "abcdefg"
print(a, b, c)
